-
Notifications
You must be signed in to change notification settings - Fork 146
51 lines (46 loc) · 1.25 KB
/
Snapshot release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Snapshot release
on:
push:
branches:
- 'json'
- 'new-parser-2021'
- 'snapshot/**'
defaults:
run:
shell: bash
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
name: snapshot-${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: Configure environment
run: |
git config --global core.autocrlf false
- name: Configure SSH
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SNAPSHOT_SSH_KEY }}
known_hosts: ${{ secrets.SNAPSHOT_KNOWN_HOSTS }}
- uses: actions/checkout@v3
- uses: ./.github/actions/git-tags
- uses: ./.github/actions/haskell
- run: ./dev/build.sh -- dist-dependencies
- run: ./dev/build.sh -- dist
- name: Install rsync (Windows)
if: runner.os == 'Windows'
uses: GuillaumeFalourd/setup-rsync@2b503a403f7185e6872bbc56f903d7395ddd75a2
- name: Upload snapshot
run: |
branchName="${BRANCH#refs/heads/}"
mkdir -pv "_upload/$branchName/"
mv -v dist "_upload/$branchName/$(git describe)/"
rsync -va _upload/ "${{ secrets.SNAPSHOT_DEST }}/"
env:
BRANCH: ${{ github.ref }}